<html>
<head>
<#include "/common/common2.ftl"/>
</head>
<body>
	<div id="rrapp" v-cloak>
		<div v-show="showList">
			<div class="m-b-md">
				<form class="layui-form layui-form-pane" role="form" id="searchForm" name="searchForm">
					<div class="layui-form-item">
						<label class="layui-form-label">报表名称:</label>
						<div class="layui-input-inline">
							<input type="text" name="reportname" id="reportname" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
						</div>
						<a href="javascript:void(0)" @click="reload" class="layui-btn layui-btn-normal" id="search">查询</a>
						<button type="button" @click="del" class="layui-btn layui-btn-danger">删除</button>
						<button type="button" @click="add" class="layui-btn layui-btn-normal">新增</button>
						<button type="button" @click="update" class="layui-btn layui-btn-normal">编辑</button>
						<button type="button" @click="update" class="layui-btn layui-btn-normal">编辑行定义</button>
						<button type="button" @click="update" class="layui-btn layui-btn-normal">编辑列定义</button>
					</div>
				</form>
			</div>
			<div class="table-responsive">
				<table class="layui-hide" id="rtabletable"></table>
			</div>
		</div>
		<div v-show="!showList" class="panel panel-default">
			<div class="panel-heading">{{title}}</div>
			<form class="layui-form-layui-form-pane">
				<div class="panel-body">
					<div class="layui-form-item">
						<label class="layui-form-label">表格编号</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" v-model="rtable.reportno" placeholder="" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">表格名称</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" v-model="rtable.reportname" placeholder="表格的唯一标识" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">表格年份</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" v-model="rtable.reportyear" placeholder="表格的年度" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">数据区域</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" v-model="rtable.dataarea" placeholder="数据区域如A1:D2" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">EXCEL模版</label>
						<div class="layui-input-block">
							<select class="layui-input" v-model="rtable.tempid" v-for="rt in  rtemplate">
								<option :value="rt.id">{{rt.filename}}</option>
							</select>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">数据库表</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" v-model="rtable.storetablename" placeholder="数据库表名" />
						</div>
					</div>
				</div>
				<footer class="panel-footer text-right bg-light lter">
					<div class="layui-form-item">
						<input type="button" class="layui-btn layui-btn-normal" @click="saveOrUpdate" value="确定" />
						&nbsp;&nbsp;
						<input type="button" class="layui-btn layui-btn-danger" @click="reload" value="返回" />
					</div>
				</footer>
			</form>
		</div>
	</div>
	<script src="/js/report/rtable.js"></script>
</body>
</html>
